-- stack: in.5 -- format: 8 (HyperCard 1) -- flags: 0x1000 (none) -- protect password hash: 0 -- maximum user level: 5 (scripting) -- window: Rect(x1=0, y1=0, x2=0, y2=0) -- screen: Rect(x1=0, y1=0, x2=0, y2=0) -- card dimensions: w=0 h=0 -- scroll: x=0 y=0 -- background count: 3 -- first background id: 5077 -- card count: 34 -- first card id: 4502 -- list block id: 8435 -- print block id: 3395 -- font table block id: 0 -- style table block id: 0 -- free block count: 0 -- free size: 0 bytes -- total size: 86752 bytes -- stack block size: 14848 bytes -- created by hypercard version: 0x00000000 -- compacted by hypercard version: 0x01258000 -- modified by hypercard version: 0x01258000 -- opened by hypercard version: 0x01258000 -- patterns[0]: 0x0000000000000000 -- patterns[1]: 0x8000000008000000 -- patterns[2]: 0x8800220088002200 -- patterns[3]: 0x8888222288882222 -- patterns[4]: 0x88AA22AA88AA22AA -- patterns[5]: 0xCCAA33AACCAA33AA -- patterns[6]: 0xEEAABBAAEEAABBAA -- patterns[7]: 0xEEBBBBEEEEBBBBEE -- patterns[8]: 0xFFBBFFEEFFBBFFEE -- patterns[9]: 0xFFBBFFFFFFBBFFFF -- patterns[10]: 0x8010022001084004 -- patterns[11]: 0xFFFFFFFFFFFFFFFF -- patterns[12]: 0x8822882288228822 -- patterns[13]: 0x1122448811224488 -- patterns[14]: 0xC4800C6843023026 -- patterns[15]: 0xB130031BD8C00C8D -- patterns[16]: 0xAA00AA00AA00AA00 -- patterns[17]: 0x8822552288225522 -- patterns[18]: 0x8855225588552255 -- patterns[19]: 0x77DD77DD77DD77DD -- patterns[20]: 0x8000000000000000 -- patterns[21]: 0xAA55AA55AA55AA55 -- patterns[22]: 0x038448300C020101 -- patterns[23]: 0x8244394482010101 -- patterns[24]: 0x8814224188412214 -- patterns[25]: 0x8080413E080814E3 -- patterns[26]: 0x22048C7422179810 -- patterns[27]: 0xBE808808EB088880 -- patterns[28]: 0x25C8328964244C92 -- patterns[29]: 0xA29C41BE2AC914EB -- patterns[30]: 0x40A00000040A0000 -- patterns[31]: 0x8040200002040800 -- patterns[32]: 0xAA00800088008000 -- patterns[33]: 0xFF80808080808080 -- patterns[34]: 0x081C22C180010204 -- patterns[35]: 0xFF808080FF080808 -- patterns[36]: 0xF87422478F172271 -- patterns[37]: 0xBF00BFBFB0B0B0B0 -- patterns[38]: 0xFF7FBE5DA2418000 -- patterns[39]: 0xFAF5FAF5A050A050 -- checksum: 0x0 ----- HyperTalk script ----- ——————————————————————Open and Close Stack handlers————————————————————— on startUp getHomeInfo set userlevel to 5 end startUp on openStack if the version < 1.2 then answer "Cette pile doit être utilisée avec la version 1.2 d'HyperCard." set lockMessages to TRUE go home else global userHold,findNextList,pushList lock screen put the userLevel into userHold set userLevel to 5 put empty into findNextList put 0 into pushList set loc of msg to 19,285 unlock screen end if end openStack on closeStack global cardName,lastFind,userHold,findNext set userLevel to userHold --initialise le contenu des variables globales pour récupérer l'espace put empty into cardName put empty into lastFind put empty into userHold put empty into findNext resetStack set lockMessages to FALSE end closeStack on doMenu command if command is "first" or command is "next" or command is "prev" or command is "last" or command is "back" or command is "find..." then cancelFindNext cancelGoBack end if pass doMenu end doMenu on arrowKey cancelFindNext pass arrowKey end arrowKey on nextCard cancelFindNext cancelGoBack visual effect scroll left go next card end nextCard on previousCard cancelFindNext cancelGoBack visual effect scroll right go previous card end previousCard on resetStack lock screen cancelFindNext cancelGoBack if the number of this card is 1 then cleanUpFirstCard else set lockRecent to TRUE go first card cleanUpFirstCard go back set lockRecent to FALSE end if end resetStack on cleanUpFirstCard lock screen show card field "Commentaires" hide button id 8 hide button id 9 hide button "Fermer" hide card field "Liste complémentaire" put empty into card field "Liste complémentaire" unlock screen with barn door close end cleanUpFirstCard on cancelFindNext global findNextList hide bg btn "Poursuivre" put empty into findNextList end cancelFindNext on cancelGoBack global pushList hide bg btn "Retour" put 0 into pushList end cancelGoBack ———————————————————————————————————————————————————————————————————————— Messages et fonctions pour les boutons Chercher... et Poursuivre ———————————————————————————————————————————————————————————————————————— on myFind global lastFind, findNextList cancelFindNext cancelGoBack ask "Rechercher dans le champ ""e&"Titre""e&" :" with lastFind if it is not empty then hide bg btn "Poursuivre" set cursor to busy lock screen put collectAllHits(it, "Titre") into hits if hits is empty then answer "Texte non trouvé." unlock screen else put it into lastFind get item 1 of hits go card it if the number of items in hits > 1 then put "1," & lastFind & "," & hits into findNextList show bg btn "Poursuivre" end if select empty unlock screen end if end if end myFind function collectAllHits text, fieldName repeat with i = 1 to 10000 --nombre arbitraire find string text in field fieldName if the result is "not found" then --texte introuvable return empty else --l'occurence est trouvée au moins une fois if i = 1 then --trouvé la première fois put the id of this card into firstFind put firstFind into result else --les fois suivantes if the id of this card is firstFind then --on est revenu à la première carte return result else --ajouter une carte au résultat put "," & the id of this card after result end if end if end if go next card --recherche à partir de la carte suivante set cursor to busy end repeat end collectAllHits on findNext global findNextList lock screen put the number of items of findNextList - 2 into max put item 1 of findNextList into N put item 2 of findNextList into text if N = max then put 1 into N else add 1 to N end if get item N + 2 of findNextList hide bg btn "Poursuivre" set cursor to watch go it show bg btn "Poursuivre" find string text in field "Titre" unlock screen put N into item 1 of findNextList end findNext ————————————————————————————Auxiliary functions————————————————————————— Ces fonctions sont appelées par différents messages dans la pile. ———————————————————————————————————————————————————————————————————————— --la fonction kwote renvoie la chaîne de caractères qui lui est passée --comme argument, entourée de quillemets function kwote string return quote & string & quote end kwote --la fonction clickLine renvoie le numéro de ligne sur laquelle --le bouton de la souris a été enfoncé function clickLine if style of the target is "scrolling" then return ((the mouseV - item 2 of the rect of the target-4 +the scroll of the target) div textheight of the target) + 1 else return ((the mouseV - item 2 of rect of the target-4) div textHeight of the target) + 1 end if end clickLine —————————————————————————*** End of File ***————————————————————————————